Cancer is unlikely to cause a sudden sharp pain, collapse is more likely to cause breathlessness, and emphysema is a chronic lung disease again more likely to cause breathlessness.
Sudden pain can be caused by a spontaneous pneumothorax (most common in skinny young men), pulmonary embolism (clot on the lung most common with people with clotting disorders), pneumonia or pleurisy.