It’s used to express the lack of money and resources in general. Many explanations are given to this sentence. They said that a sailor used “A todo trapo” or “A palo seco” meaning that the boat only sailed by two sails (“velas”), not using all the resources; but this is not convincing.
It is also said because of the gesture that is done to show that you don’t have money, that is to put your handes in your pockets and stretching of the lining inside out. For the triangular shape and the white color, they used to compare them with the sails of a boat. José María Iribarrén, in “El porqué de los dichos” states that it is possible that this sentence alludes to the game of cards and to the person who represents the bank who had 2 candles to count all the money. In this case, leave someone “a dos velas” meant leave him without money, bankrupt. Gregorio Doval, in his “Del hecho al dicho“, relates the “velas” with the mucus of children. Of brats they use to say that the had “velas colgando”. In this example of poverty and homelessness should be added the fact that the sentence “Estar a dos velas” is often accompanied by the gesture moving the index and middle fingers up and down, one on each side of the nose.