The error occurs because plt.plot(x, y) expects x and y to be lists or arrays which have a length while you have given it a float. You could avoid this by enclosing [atom1[i]] in square brackets making it a list.
However, it is usually best to avoid this as it is unclear what is going on. Instead of looping through each atom just stick them all together into one array then plot the columns of the array. You may even find when you create the atoms you can just create them in an array in the first place. Example:
from matplotlib import pyplot as plt
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
# Define several atoms, these are numpy arrays of length 3
# randomly pulled from a uniform distribution between -1 and 1
atom1 = np.random.uniform(-1, 1, 3)
atom2 = np.random.uniform(-1, 1, 3)
atom3 = np.random.uniform(-1, 1, 3)
atom4 = np.random.uniform(-1, 1, 3)
# Define a list of colors to plot atoms
colors = ['r', 'g', 'b', 'k']
# Here all the atoms are stacked into a (4, 3) array
atoms = np.vstack([atom1, atom2, atom3, atom4])
ax = plt.subplot(111, projection='3d')
# Plot scatter of points
ax.scatter3D(atoms[:, 0], atoms[:, 1], atoms[:, 2], c=colors)
plt.show()
I added the colors since it is helpful to see which atom is which.