のに is an adversative conjunction, and it expresses a wish which is impossible/hard to be realized when it's put at the end of a sentence. Thus, it's close to subjunctive past in English.
空を飛べたらいいのに(でも実際は飛べない)。
I wish I could fly (but actually I can't).