Yes, if you had gross income from stock sales, you should file a tax return. The IRS will receive a copy of any Forms 1099-B that were issued to you reporting the sales. If you don't file a return, you may receive a notice from the IRS proposing to tax you on the gross proceeds.
If you have a net capital loss on your return, you may be able to deduct it next year.
See IRS Tax Topic 409 for more information.
See also this help article for more information.