Lemons cannot be produced through the Farming skill. However, they can be used to make regular compost.
Players can buy lemons from Heckel Funch (20 in stock) and Hudo (10 in stock, closer to bank) in the Grand Tree for 2 coins a piece. These gradually replenish once players buy them. They can also be looted from the gnomes throughout the stronghold.