All of us want Lakshmi (goddess of wealth) to reside in our homes so that our homes are always brimming with wealth and prosperity. And at the same time we also dread Alakshmi or Jyestha (goddess of poverty). We want that Alakshmi should never enter our homes. So here the Lemon and Green Chillies come into play.
Actually Alakshmi is the sister of Lakshmi. Alakshmi loves sour, pungent and hot things. So we tie Lemons and Green Chillies on the doorways so that Alakshmi will only come to our doors and seeing her favorite things to eat will eat them at the doorway. And thus sating her hunger will go away and never enter our homes and shops.
On the contrary Lakshmi loves sweet dishes, so all of us prepare sweet dishes on festivals to invite Lakshmi with all our hearts to our home.
Some people may find it superstitious but after knowing the real significance it is better to tie one at the doorways.