SD and ADXL345 together on SPI

Ugh. A F**ing breadboard diagram.

Both those devices are 3.3V only and the Mega is 5V. You need level shifters or resistors at the very least.

Look at other data logger projects. This is a very common requirement. Lots of people have done this before.