help me to write avr project for opening electrically controlled valve when the moisture content of the soil becomes less than the entered value??????????
Exactly. This sounds like a very interesting little project, but you need to have something designed already. I've heard that these kind of home irrigation projects are very popular nowadays so you should find something using google.
How are you planning to measure the moisture?
What kind of valve do you have? How many valves do you have?
Is this your first microcontroller project? How skilled/experienced you are with electronics in general?
This is one of the projects a ways down on my list. There is at least one place on the net that show you how to make the blocks for measuring soil moisture.
I think the cats meow here would be to have the controller serve web pages. That way you could program it from your PC or smart phone. Make it faceless and maybe wifi. You could program or inspect a system with several of these controllers from one place.