Type of Soil:
Lemon trees, in fact all citrus trees, prefer slightly acid, all-purpose potting soil. For my lemon tree, I am using all-purpose Miracle-Gro, which works very nicely.
Light:
Lemon Trees require a lot of light, and therefore should be placed in full sun facing South. If your window does not have Southern exposure, you will want to use a fluorescent plant light of 40-watts and keep the light on your lemon tree for at least 12 hours during the day.
Moisture Level:
Lemon trees prefer moist soil. But be careful not to over water the tree as you do not want to rot the roots. If you find that the soil is extremely moist to soggy, skip a day or two and then continue watering your lemon tree. Also misting your lemon tree's leaves provide an extra boost.
Preferred Temperature levels:
Lemon trees do best in warm climates. Temperatures that are in the 70s, however, a citrus tree will not suffer from higher temperatures. Here in the North-Eastern part of the United States temperatures have been near 90 and my Eureka Lemon Tree is doing well. If you're concerned about your tree getting too much sun, provide some shade during hotter days. But don't worry about your lemon getting too much sun.
Getting your tree to blossom:
Lemon trees can take years to begin producing flowers. Anywhere between 8-15 years if you have never grafted your tree. Grafting helps the maturing process by "tricking" the tree into thinking that it is older, which usually yields blossoms and fruit within 2-3 years time.
Unfortunately, if you allow your tree to take its own course, your tree may never blossom. If your tree does blossom, and once it does, you will want to increase your chances of having your tree produce fruit by pollinating the tree. Of course, if you are growing your tree indoors, you will have to use a cotton swab to rub the pollen that is in the flowers, going from flower to flower gently rubbing the inside. This should help to ensure that your tree will begin to produce fruit.