battery capacity left in my 3.7V lithium poly battery(like 30% or in bars) which is being charged by solar panel.
Shouldn't be too hard. Just wire the cells positive output to a Arduino analog input pin and read its value. A lithium has a pretty linear discharge voltage. 4.2 vdc is considered 100% and around 3.0 is 0%. Never let a lith battery discharge under 3vdc or you risk damaging the cell. Some cells have internal low voltage cut-off circuitry, but unless you know that for sure it's on you to disconnect when approaching 3vdc.
Lefty